how to create an array of objects in java